.class final Lcom/mobisage/android/D;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field private static a:Lcom/mobisage/android/D;


# instance fields
.field private b:Ljava/lang/String;

.field private c:Lcom/mobisage/android/E;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 16
    new-instance v0, Lcom/mobisage/android/D;

    invoke-direct {v0}, Lcom/mobisage/android/D;-><init>()V

    sput-object v0, Lcom/mobisage/android/D;->a:Lcom/mobisage/android/D;

    return-void
.end method

.method private constructor <init>()V
    .locals 3

    .prologue
    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 25
    sget-object v0, Lcom/mobisage/android/r;->h:Landroid/content/Context;

    const-string v1, "location"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/location/LocationManager;

    .line 26
    if-eqz v0, :cond_0

    .line 27
    new-instance v0, Lcom/mobisage/android/E;

    invoke-direct {v0}, Lcom/mobisage/android/E;-><init>()V

    iput-object v0, p0, Lcom/mobisage/android/D;->c:Lcom/mobisage/android/E;

    .line 28
    iget-object v0, p0, Lcom/mobisage/android/D;->c:Lcom/mobisage/android/E;

    const-wide/16 v1, 0xe10

    iput-wide v1, v0, Lcom/mobisage/android/E;->e:J

    .line 29
    invoke-static {}, Lcom/mobisage/android/R;->a()Lcom/mobisage/android/R;

    move-result-object v0

    iget-object v1, p0, Lcom/mobisage/android/D;->c:Lcom/mobisage/android/E;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/R;->a(Lcom/mobisage/android/Q;)V

    .line 31
    :cond_0
    const-string v0, "0 0"

    iput-object v0, p0, Lcom/mobisage/android/D;->b:Ljava/lang/String;

    .line 32
    return-void
.end method

.method public static a()Lcom/mobisage/android/D;
    .locals 1

    .prologue
    .line 19
    sget-object v0, Lcom/mobisage/android/D;->a:Lcom/mobisage/android/D;

    return-object v0
.end method


# virtual methods
.method public final b()Ljava/lang/String;
    .locals 1

    .prologue
    .line 44
    iget-object v0, p0, Lcom/mobisage/android/D;->b:Ljava/lang/String;

    return-object v0
.end method

.method public final c()V
    .locals 4

    .prologue
    .line 48
    invoke-static {}, Lcom/mobisage/android/w;->a()Lcom/mobisage/android/w;

    move-result-object v0

    const-string v1, "enablelocation"

    invoke-virtual {v0, v1}, Lcom/mobisage/android/w;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Boolean;

    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-nez v0, :cond_1

    .line 60
    :cond_0
    :goto_0
    return-void

    .line 51
    :cond_1
    sget-object v0, Lcom/mobisage/android/r;->h:Landroid/content/Context;

    const-string v1, "location"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/location/LocationManager;

    .line 52
    new-instance v1, Landroid/location/Criteria;

    invoke-direct {v1}, Landroid/location/Criteria;-><init>()V

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/location/LocationManager;->getBestProvider(Landroid/location/Criteria;Z)Ljava/lang/String;

    move-result-object v1

    .line 53
    if-eqz v1, :cond_0

    .line 55
    invoke-virtual {v0, v1}, Landroid/location/LocationManager;->getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;

    move-result-object v0

    .line 56
    if-eqz v0, :cond_0

    .line 57
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0}, Landroid/location/Location;->getLongitude()D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v0}, Landroid/location/Location;->getLatitude()D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/mobisage/android/D;->b:Ljava/lang/String;

    goto :goto_0
.end method

.method protected final finalize()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .prologue
    .line 36
    invoke-static {}, Lcom/mobisage/android/R;->a()Lcom/mobisage/android/R;

    move-result-object v0

    iget-object v1, p0, Lcom/mobisage/android/D;->c:Lcom/mobisage/android/E;

    invoke-virtual {v0, v1}, Lcom/mobisage/android/R;->b(Lcom/mobisage/android/Q;)V

    .line 37
    invoke-super {p0}, Ljava/lang/Object;->finalize()V

    .line 38
    return-void
.end method
